﻿<%@ Page Title="Strategic Asset Management Las Vegas: Graphs" Language="C#" MasterPageFile="~/Site2.master"
   AutoEventWireup="true" CodeBehind="Dashboard3.aspx.cs" Inherits="LenderClearingHouse.Dashboard3"
   ValidateRequest="false" EnableViewState="true" %>

<%@ Register TagPrefix="dcwc" Namespace="Dundas.Charting.WebControl" Assembly="DundasWebChart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2012.1.411.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
<%@ Register TagPrefix="asp" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit, Version=4.1.7.1213, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" %>

<asp:Content ID="Content3" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="cphPageHeader" runat="server">
   Property Performance
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMain" runat="server">
   <asp:UpdatePanel ID="upd" UpdateMode="Conditional" ChildrenAsTriggers="true" runat="server">
      <ContentTemplate>
         <table width="100%">
            <tr>
               <td>
                  <asp:DataPager ID="pagerTop" runat="server" PagedControlID="lvFake">
                     <Fields>
                        <asp:NextPreviousPagerField ShowFirstPageButton="True" ShowNextPageButton="False"
                           FirstPageText="<<" PreviousPageText="<" />
                        <asp:NumericPagerField />
                        <asp:NextPreviousPagerField ShowLastPageButton="True" ShowPreviousPageButton="False"
                           NextPageText=">" LastPageText=">>" />
                     </Fields>
                  </asp:DataPager>
               </td>
               
               <td>
              <asp:Label ID="lbIvestor" runat="server" Text="Investor"></asp:Label>&nbsp;
              <telerik:RadComboBox ID="cbInvestor" runat="server" Width="200" EmptyMessage="Type a Investor Name"
                  AllowCustomText="false" MarkFirstMatch="true" AutoPostBack="true" DataSourceID="SqlDataSourceInvestorCombo"
                  DataTextField="UserName" DataValueField="UserId" 
                  onselectedindexchanged="cbInvestor_SelectedIndexChanged">
               </telerik:RadComboBox>
               <asp:SqlDataSource ID="SqlDataSourceInvestorCombo" runat="server" ConnectionString="<%$ ConnectionStrings:SQLConnection %>"
                  SelectCommand="getInvestorsCombo" SelectCommandType="StoredProcedure" />
            </td>
            
            <td>
           
            <asp:CalendarExtender ID="CalendarFromDate" runat="server" TargetControlID="txtFromDate" PopupButtonID="btnFromDate" Format="MM.dd.yyyy" >                 </asp:CalendarExtender>
            <asp:MaskedEditExtender ID="meeFromDate" runat="server" TargetControlID="txtFromDate" CultureName="en-US" Mask="99.99.9999" clearmaskonlostfocus="false" MaskType="None"></asp:MaskedEditExtender>
            <asp:TextBox ID="txtFromDate" Format="MM.dd.yyyy" runat="server" width="100px"  ></asp:Textbox>
            <asp:Image ID="btnFromDate" runat="server" Style="vertical-align: middle; cursor: pointer;"
                AlternateText="Choose Date"  ImageUrl="~/images/Calendar_icon.png" Width="16" Height="16" />
            <span> - </span>
            <asp:CalendarExtender ID="CalendarToDate" runat="server" TargetControlID="txtToDate" PopupButtonID="btnToDate" Format="MM.dd.yyyy">                             </asp:CalendarExtender>
            <asp:MaskedEditExtender ID="meeToDate" runat="server" TargetControlID="txtToDate" CultureName="en-US" Mask="99.99.9999" clearmaskonlostfocus="false" MaskType="None"></asp:MaskedEditExtender>
            <asp:TextBox ID="txtToDate" Format="MM.dd.yyyy" runat="server" width="100px" ></asp:Textbox>
            <asp:Image ID="btnToDate" runat="server" Style="vertical-align: middle; cursor: pointer;"
                AlternateText="Choose Date"  ImageUrl="~/images/Calendar_icon.png" Width="16" Height="16" /> &nbsp;
            <asp:Button id="reloadButton" runat="server" Text="Show" OnClick="calendarDate_Changed" /> 
            </td>
            </tr>
            <tr>
                <td></td><td></td>
                <td >
                    <asp:Label ID ="lblDataValidate" style = "display: none; color: red" runat="server"></asp:Label>
                </td>
            </tr>
         </table>
         <dcwc:Chart ID="Chart1" runat="server" Height="800px" Width="1160px" Palette="Pastel">
            <Series>
               <dcwc:Series Name="Average selling price" BorderWidth="5" BorderColor="Black">
               </dcwc:Series>
               <dcwc:Series Name="Average purchase price" BorderWidth="5" BorderColor="Black">
               </dcwc:Series>
               <dcwc:Series Name="Average cost of operation" BorderWidth="5" BorderColor="Black">
               </dcwc:Series>
               <dcwc:Series Name="Average Net Profit" BorderWidth="5" BorderColor="Black">
               </dcwc:Series>
               <dcwc:Series Name="100% equals total equity invested on property" BorderWidth="5" BorderColor="Black" Color="Black">
               </dcwc:Series>
            </Series>
            <ChartAreas>
               <dcwc:ChartArea Name="Default">
               </dcwc:ChartArea>
            </ChartAreas>
         </dcwc:Chart>
         <asp:ListView ID="lvFake" runat="server" OnPagePropertiesChanging="lvFake_PagePropertiesChanging"
            Visible="false">
            <LayoutTemplate>
               <ul>
                  <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
               </ul>
            </LayoutTemplate>
            <ItemTemplate>
               <li>
                  <%# Eval("IdYear")%>
               </li>
            </ItemTemplate>
            <EmptyDataTemplate>
               No data
            </EmptyDataTemplate>
         </asp:ListView>
         <asp:DataPager ID="pagerBottom" runat="server" PagedControlID="lvFake">
            <Fields>
               <asp:NextPreviousPagerField ShowFirstPageButton="True" ShowNextPageButton="False"
                  FirstPageText="<<" PreviousPageText="<" />
               <asp:NumericPagerField />
               <asp:NextPreviousPagerField ShowLastPageButton="True" ShowPreviousPageButton="False"
                  NextPageText=">" LastPageText=">>" />
            </Fields>
         </asp:DataPager>
      </ContentTemplate>
   </asp:UpdatePanel>
</asp:Content>
